package com.lbd.gulimall.cart.vo;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Author: linbd
 * @Description:
 * @Date: 2023/3/23 22:20
 */
public class CartItemVO {
    private Long skuId;
    private Boolean checked = true;
    private String title;
    private String image;
    private BigDecimal price;
    private Integer count;
    private BigDecimal totalPrice;
    private List<String> skuSaleList;

    public Long getSkuId() {
        return skuId;
    }

    public void setSkuId(Long skuId) {
        this.skuId = skuId;
    }

    public Boolean getChecked() {
        return checked;
    }

    public void setChecked(Boolean checked) {
        this.checked = checked;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public BigDecimal getTotalPrice() {
        return price.multiply(BigDecimal.valueOf(count));
    }
    public List<String> getSkuSaleList() {
        return skuSaleList;
    }

    public void setSkuSaleList(List<String> skuSaleList) {
        this.skuSaleList = skuSaleList;
    }

    @Override
    public String toString() {
        return "CartItemVO{" +
                "skuId=" + skuId +
                ", checked=" + checked +
                ", title='" + title + '\'' +
                ", image='" + image + '\'' +
                ", price=" + price +
                ", count=" + count +
                ", totalPrice=" + getTotalPrice() +
                ", skuSaleList=" + skuSaleList +
                '}';
    }
}
